package com.demo.beans;

public class User1 {
    private int id;
    private String name;
    private String password;

    //有参构造方法
    public User1(int id, String name, String password) {
        this.id = id;
        this.name = name;
        this.password = password;
        System.out.println("--User1类的有参构造方法被调用，生成User1对象并交给Spring容器管理");
        System.out.println("--传入的参数值：id=" + id + ",name=" + name + ",password=" + password);
    }

    @Override
    public String toString() {
        return "User1{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}